import request from '@/utils/request'

// 添加员工
export function addStaff(obj) {
  return request({
    url: '/staff/add',
    method: 'post',
    data: obj,
  })
}

// 员工列表
export function staffList(params) {
  return request({
    url: '/staff/list',
    method: 'get',
    params
  })
}

// 删除单位
export function deleteStaff(obj) {
  return request({
    url: '/staff/delete',
    method: 'delete',
    params: obj
  })
}


// 更新员工
export function updateStaff(obj) {
  return request({
    url: '/staff/update',
    method: 'post',
    data: obj
  })
}

// 更新员工权限
export function updateStaffAuthority(obj) {
  return request({
    url: '/staff/updateStaffAuthority',
    method: 'post',
    data: obj
  })
}

// 获取账目
export function searchWebNote(obj) {
  return request({
    url: '/staff/searchWebNote',
    method: 'get',
    params: obj
  })
}

// 导出账目
export function exportNotes(params) {
  return request({
    url: '/staff/exportNotes',
    method: 'get',
    params,
    responseType: "arraybuffer",
    showMessage: true
  })
}

// 车牌OCR
export function ocrStaff(obj) {
  return request({
    url: '/ocr/staff',
    method: 'get',
    params: obj
  })
}

// 更新OCR额度
export function ocrUpdate(obj) {
  return request({
    url: '/ocr/update',
    method: 'post',
    data: obj
  })
}

// 查询员工ocr识别记录
export function ocrRecord(obj) {
  return request({
    url: '/ocr/ocrRecord',
    method: 'get',
    params: obj
  })
}

export function updateCarStore(obj) {
  return request({
    url: '/ocr/updateCarStore',
    method: 'post',
    data: obj,
    contentType: 'multipart/form-data'
  })
}

export function cars(obj) {
  return request({
    url: '/ocr/cars',
    method: 'get',
    params: obj
  })
}


export function tollCollectors(obj) {
  return request({
    url: '/tollCollectors/list',
    method: 'get',
    params: obj
  })
}


// 删除单位
export function deleteTollCollectors(obj) {
  return request({
    url: '/tollCollectors/delete',
    method: 'delete',
    params: obj
  })
}


export function tollCollectorsExportExcel(params) {
  return request({
    url: '/tollCollectors/exportExcel',
    method: 'get',
    params,
    responseType: "arraybuffer",
    showMessage: true
  })
}


// 状态审核
export function tollCollectorsReview(obj) {
  return request({
    url: '/tollCollectors/review',
    method: 'post',
    data: obj
  })
}